<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>北京市昌平振华学校</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<ul class="nav nav-pills">
				<li >
					 <a href="${pageContext.request.contextPath}/bill/allBill">收银管理</a>
				</li>
				<li class="active">
					 <a href="${pageContext.request.contextPath}/clazz/allClass">班级管理</a>
				</li>
				<li >
				    <a href="${pageContext.request.contextPath}/student/allStudent">学生管理</a>
				</li>
			</ul>
			<div class="row clearfix">
				<div class="col-md-12 column">
				</div>
			</div>
		</div>
	</div>
</div>
<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>班级信息</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/clazz/toAddClass">新增</a>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>年级名称</th>
                    <th>班级名称</th>
                    <th>班主任</th>
                    <th>班任电话</th>
                    <th>班级人数</th>
                    <th>已缴费人数</th>
                    <th>操作</th>
                </tr>
                </thead>

                <tbody>
                <c:forEach var="clazz" items="${requestScope.get('list')}">
                    <tr>
                        <td>${clazz.getYearName()}</td>
                        <td>${clazz.getClassName()}</td>
                        <td>${clazz.getOwnerName()}</td>
                        <td>${clazz.getOwnerPhone()}</td>
                        <td>${clazz.getTotal()}</td>
                        <td>${clazz.getFinish()}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/clazz/toUpdateClass?classId=${clazz.getClassId()}">更改</a> |
                            <a href="${pageContext.request.contextPath}/clazz/del/${clazz.getClassId()}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>